home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / MarkzScout™ 14-day trial / Scripts / Used Colors.M1S < prev    next >
Encoding:
Text File  |  1999-02-05  |  1.4 KB  |  63 lines  |  [TEXT/MSCT]

  1. //
  2. // Used Colors.M1S: show color list for document
  3. //
  4.  
  5. //
  6. // *************************************
  7. // Procedures
  8. // *************************************
  9. //
  10.  
  11. proc colorProc
  12.   
  13.   print
  14.     Left(
  15.       it.color_type
  16.       +"                ",16)+
  17.     Left(
  18.       it.color_model
  19.       +"                ",16)
  20.     + it.name
  21.  
  22. endproc
  23.  
  24. //
  25. // **************************************
  26. // The actual script
  27. // **************************************
  28. //
  29. // Save 'it' in 'theJob' - 'it' is under control of MarkzONE and
  30. // changes value quite often
  31. //
  32.  
  33. theJob = it
  34.  
  35. //
  36. // Gimme a title
  37. //
  38. print "Used Color List for " + theJob.name
  39. print "Color Type      Color Model     Color Name"
  40. print "----------      -----------     ----------"
  41.  
  42. //
  43. // Gimme a color list: execute 'colorProc' (see above) for each of the colors
  44. // encountered during scan. Scan will start from 'theJob' and then
  45. // descend through the job's treestructure of objects - anything that is 
  46. // either used, contained in, overlapping with - so it will 
  47. // find all colors used by boxes, all colors used by contained images, 
  48. // ... and so on...
  49. //
  50. on color do colorProc
  51. scan theJob links uses,contains,overlaps
  52. //
  53. // 'scan reset' clears the 'on color' - it is a good idea to 
  54. // do scan reset as soon as possible to avoid unexpected results
  55. // because of an 'on' statement that is still in effect.
  56. scan reset
  57.  
  58. //
  59. // Gimme a line
  60. //
  61. print "---------------------------------------"
  62.  
  63.